/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * 
 * 
 *
 * 
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using System;
using System.Collections.Generic;
using System.Text;


namespace JDCloudSDK.Ipanti.Model
{

    /// <summary>
    ///  webWhiteListRule
    /// </summary>
    public class WebWhiteListRule
    {

        ///<summary>
        /// 白名单规则 Id
        ///</summary>
        public string Id{ get; set; }
        ///<summary>
        /// 白名单规则名称
        ///</summary>
        public string Name{ get; set; }
        ///<summary>
        /// 匹配模式:&lt;br&gt;- 0: uri&lt;br&gt;- 1: ip&lt;br&gt;- 2: cookie&lt;br&gt;- 3: geo&lt;br&gt;- 4: header
        ///</summary>
        public int? Mode{ get; set; }
        ///<summary>
        /// 匹配 key. &lt;br&gt;- mode 为 cookie 时, 为 cookie 的 name&lt;br&gt;- mode 为 header 时, 为 header 的 key
        ///</summary>
        public string Key{ get; set; }
        ///<summary>
        /// 匹配 value. &lt;br&gt;- mode 为 uri 时, 为要匹配的 uri&lt;br&gt;- mode 为 ip 时, 为引用的 ip 黑白名单 Id&lt;br&gt;- mode 为 cookie 时, 为 cookie 的 value&lt;br&gt;- mode 为 header 时, 为 header 的 value
        ///</summary>
        public string Value{ get; set; }
        ///<summary>
        /// 匹配规则, mode 为 uri, cookie 和 header 时有效. 包含以下匹配规则: &lt;br&gt;- 0: 完全匹配&lt;br&gt;- 1: 前缀匹配&lt;br&gt;- 2: 包含&lt;br&gt;- 3: 正则匹配&lt;br&gt;- 4: 后缀匹配
        ///</summary>
        public int? Pattern{ get; set; }
        ///<summary>
        /// 命中后处理动作. &lt;br&gt;- 0: 放行&lt;br&gt;- 1: CC 防护
        ///</summary>
        public int? Action{ get; set; }
        ///<summary>
        /// 规则状态. &lt;br&gt;- 0: 关闭&lt;br&gt;- 1: 开启
        ///</summary>
        public int? Status{ get; set; }
        ///<summary>
        /// geo 白名单地域列表
        ///</summary>
        public List<Geo> GeoList{ get; set; }
    }
}
